//
//  NewTableViewCell.m
//  A_HandHeldLOL
//
//  Created by Zhao YanBin on 16/1/16.
//  Copyright © 2016年 zhaoyanbin. All rights reserved.
//

#import "NewTableViewCell.h"

@implementation NewTableViewCell

- (void)dealloc
{
    [_imgView release];
    [_time release];
    [_title release];
    [_subhead release];
    [super dealloc];
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //图片
        self.imgView = [[UIImageView alloc] init];
        [self.contentView addSubview:_imgView];
//        self.imgView.backgroundColor = [UIColor blueColor];
        [_imgView release];
        
        //标题
        self.title = [[UILabel alloc] init];
//        self.title.backgroundColor = [UIColor redColor];
        self.title.numberOfLines = 0;
        [self.contentView addSubview:_title];
        [_title release];
        
        //副标题
        self.subhead = [[UILabel alloc] init];
        self.subhead.backgroundColor = [UIColor clearColor];
        self.subhead.numberOfLines = 0;
        [self.contentView addSubview:_subhead];
        [_subhead release];
        
        //时间
        self.time = [[UILabel alloc] init];
//        self.time.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:_time];
        [_time release];
    }
    return  self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.imgView.frame = CGRectMake(10, 10, 80, 80);
    self.title.frame = CGRectMake(100, 0, 250, 50);
    self.subhead.frame = CGRectMake(100, 50, 250, 50);
    self.time.frame = CGRectMake(320, 80, 100, 30);
}






- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
